; generated by Component: ARM Compiler 5.06 update 4 (build 422) Tool: ArmCC [4d3604]
; commandline ArmCC [--list --split_sections --debug -c --asm --interleave -o..\out\stm32f10x_pwr.o --asm_dir=.\Lst\ --list_dir=.\Lst\ --depend=..\out\stm32f10x_pwr.d --cpu=Cortex-M3 --apcs=interwork -O0 --diag_suppress=9931 -I..\Libraries\inc -I..\CMSIS -I..\users -I..\Libraries\src -I..\Libraries\sys -I..\COMM -I..\MOD -I..\CAN -D__MICROLIB -D__UVISION_VERSION=523 -D_RTE_ -DSTM32F10X_HD -DSTM32F10X_HD -DUSE_STDPERIPH_DRIVER --omf_browse=..\out\stm32f10x_pwr.crf ..\Libraries\src\stm32f10x_pwr.c]
                          THUMB

                          AREA ||i.PWR_BackupAccessCmd||, CODE, READONLY, ALIGN=2

                  PWR_BackupAccessCmd PROC
;;;123      */
;;;124    void PWR_BackupAccessCmd(FunctionalState NewState)
000000  4901              LDR      r1,|L1.8|
;;;125    {
;;;126      /* Check the parameters */
;;;127      assert_param(IS_FUNCTIONAL_STATE(NewState));
;;;128      *(__IO uint32_t *) CR_DBP_BB = (uint32_t)NewState;
000002  6208              STR      r0,[r1,#0x20]
;;;129    }
000004  4770              BX       lr
;;;130    
                          ENDP

000006  0000              DCW      0x0000
                  |L1.8|
                          DCD      0x420e0000

                          AREA ||i.PWR_ClearFlag||, CODE, READONLY, ALIGN=2

                  PWR_ClearFlag PROC
;;;286      */
;;;287    void PWR_ClearFlag(uint32_t PWR_FLAG)
000000  4903              LDR      r1,|L2.16|
;;;288    {
;;;289      /* Check the parameters */
;;;290      assert_param(IS_PWR_CLEAR_FLAG(PWR_FLAG));
;;;291             
;;;292      PWR->CR |=  PWR_FLAG << 2;
000002  6809              LDR      r1,[r1,#0]
000004  ea410180          ORR      r1,r1,r0,LSL #2
000008  4a01              LDR      r2,|L2.16|
00000a  6011              STR      r1,[r2,#0]
;;;293    }
00000c  4770              BX       lr
;;;294    
                          ENDP

00000e  0000              DCW      0x0000
                  |L2.16|
                          DCD      0x40007000

                          AREA ||i.PWR_DeInit||, CODE, READONLY, ALIGN=1

                  PWR_DeInit PROC
;;;111      */
;;;112    void PWR_DeInit(void)
000000  b510              PUSH     {r4,lr}
;;;113    {
;;;114      RCC_APB1PeriphResetCmd(RCC_APB1Periph_PWR, ENABLE);
000002  2101              MOVS     r1,#1
000004  0708              LSLS     r0,r1,#28
000006  f7fffffe          BL       RCC_APB1PeriphResetCmd
;;;115      RCC_APB1PeriphResetCmd(RCC_APB1Periph_PWR, DISABLE);
00000a  2100              MOVS     r1,#0
00000c  f04f5080          MOV      r0,#0x10000000
000010  f7fffffe          BL       RCC_APB1PeriphResetCmd
;;;116    }
000014  bd10              POP      {r4,pc}
;;;117    
                          ENDP


                          AREA ||i.PWR_EnterSTANDBYMode||, CODE, READONLY, ALIGN=2

                  PWR_EnterSTANDBYMode PROC
;;;235      */
;;;236    void PWR_EnterSTANDBYMode(void)
000000  480a              LDR      r0,|L4.44|
;;;237    {
;;;238      /* Clear Wake-up flag */
;;;239      PWR->CR |= PWR_CR_CWUF;
000002  6800              LDR      r0,[r0,#0]
000004  f0400004          ORR      r0,r0,#4
000008  4908              LDR      r1,|L4.44|
00000a  6008              STR      r0,[r1,#0]
;;;240      /* Select STANDBY mode */
;;;241      PWR->CR |= PWR_CR_PDDS;
00000c  4608              MOV      r0,r1
00000e  6800              LDR      r0,[r0,#0]
000010  f0400002          ORR      r0,r0,#2
000014  6008              STR      r0,[r1,#0]
;;;242      /* Set SLEEPDEEP bit of Cortex System Control Register */
;;;243      SCB->SCR |= SCB_SCR_SLEEPDEEP;
000016  4806              LDR      r0,|L4.48|
000018  6800              LDR      r0,[r0,#0]
00001a  f0400004          ORR      r0,r0,#4
00001e  4904              LDR      r1,|L4.48|
000020  6008              STR      r0,[r1,#0]
;;;244    /* This option is used to ensure that store operations are completed */
;;;245    #if defined ( __CC_ARM   )
;;;246      __force_stores();
000022  bf00              NOP      
000024  bf00              NOP      
;;;247    #endif
;;;248      /* Request Wait For Interrupt */
;;;249      __WFI();
000026  bf30              WFI      
;;;250    }
000028  4770              BX       lr
;;;251    
                          ENDP

00002a  0000              DCW      0x0000
                  |L4.44|
                          DCD      0x40007000
                  |L4.48|
                          DCD      0xe000ed10

                          AREA ||i.PWR_EnterSTOPMode||, CODE, READONLY, ALIGN=2

                  PWR_EnterSTOPMode PROC
;;;196      */
;;;197    void PWR_EnterSTOPMode(uint32_t PWR_Regulator, uint8_t PWR_STOPEntry)
000000  b510              PUSH     {r4,lr}
;;;198    {
000002  4602              MOV      r2,r0
;;;199      uint32_t tmpreg = 0;
000004  2000              MOVS     r0,#0
;;;200      /* Check the parameters */
;;;201      assert_param(IS_PWR_REGULATOR(PWR_Regulator));
;;;202      assert_param(IS_PWR_STOP_ENTRY(PWR_STOPEntry));
;;;203      
;;;204      /* Select the regulator state in STOP mode ---------------------------------*/
;;;205      tmpreg = PWR->CR;
000006  4b0c              LDR      r3,|L5.56|
000008  6818              LDR      r0,[r3,#0]
;;;206      /* Clear PDDS and LPDS bits */
;;;207      tmpreg &= CR_DS_MASK;
00000a  f0200003          BIC      r0,r0,#3
;;;208      /* Set LPDS bit according to PWR_Regulator value */
;;;209      tmpreg |= PWR_Regulator;
00000e  4310              ORRS     r0,r0,r2
;;;210      /* Store the new value */
;;;211      PWR->CR = tmpreg;
000010  6018              STR      r0,[r3,#0]
;;;212      /* Set SLEEPDEEP bit of Cortex System Control Register */
;;;213      SCB->SCR |= SCB_SCR_SLEEPDEEP;
000012  4b0a              LDR      r3,|L5.60|
000014  681b              LDR      r3,[r3,#0]
000016  f0430304          ORR      r3,r3,#4
00001a  4c08              LDR      r4,|L5.60|
00001c  6023              STR      r3,[r4,#0]
;;;214      
;;;215      /* Select STOP mode entry --------------------------------------------------*/
;;;216      if(PWR_STOPEntry == PWR_STOPEntry_WFI)
00001e  2901              CMP      r1,#1
000020  d101              BNE      |L5.38|
;;;217      {   
;;;218        /* Request Wait For Interrupt */
;;;219        __WFI();
000022  bf30              WFI      
000024  e000              B        |L5.40|
                  |L5.38|
;;;220      }
;;;221      else
;;;222      {
;;;223        /* Request Wait For Event */
;;;224        __WFE();
000026  bf20              WFE      
                  |L5.40|
;;;225      }
;;;226      
;;;227      /* Reset SLEEPDEEP bit of Cortex System Control Register */
;;;228      SCB->SCR &= (uint32_t)~((uint32_t)SCB_SCR_SLEEPDEEP);  
000028  4b04              LDR      r3,|L5.60|
00002a  681b              LDR      r3,[r3,#0]
00002c  f0230304          BIC      r3,r3,#4
000030  4c02              LDR      r4,|L5.60|
000032  6023              STR      r3,[r4,#0]
;;;229    }
000034  bd10              POP      {r4,pc}
;;;230    
                          ENDP

000036  0000              DCW      0x0000
                  |L5.56|
                          DCD      0x40007000
                  |L5.60|
                          DCD      0xe000ed10

                          AREA ||i.PWR_GetFlagStatus||, CODE, READONLY, ALIGN=2

                  PWR_GetFlagStatus PROC
;;;260      */
;;;261    FlagStatus PWR_GetFlagStatus(uint32_t PWR_FLAG)
000000  4601              MOV      r1,r0
;;;262    {
;;;263      FlagStatus bitstatus = RESET;
000002  2000              MOVS     r0,#0
;;;264      /* Check the parameters */
;;;265      assert_param(IS_PWR_GET_FLAG(PWR_FLAG));
;;;266      
;;;267      if ((PWR->CSR & PWR_FLAG) != (uint32_t)RESET)
000004  4a03              LDR      r2,|L6.20|
000006  6852              LDR      r2,[r2,#4]
000008  400a              ANDS     r2,r2,r1
00000a  b10a              CBZ      r2,|L6.16|
;;;268      {
;;;269        bitstatus = SET;
00000c  2001              MOVS     r0,#1
00000e  e000              B        |L6.18|
                  |L6.16|
;;;270      }
;;;271      else
;;;272      {
;;;273        bitstatus = RESET;
000010  2000              MOVS     r0,#0
                  |L6.18|
;;;274      }
;;;275      /* Return the flag status */
;;;276      return bitstatus;
;;;277    }
000012  4770              BX       lr
;;;278    
                          ENDP

                  |L6.20|
                          DCD      0x40007000

                          AREA ||i.PWR_PVDCmd||, CODE, READONLY, ALIGN=2

                  PWR_PVDCmd PROC
;;;136      */
;;;137    void PWR_PVDCmd(FunctionalState NewState)
000000  4901              LDR      r1,|L7.8|
;;;138    {
;;;139      /* Check the parameters */
;;;140      assert_param(IS_FUNCTIONAL_STATE(NewState));
;;;141      *(__IO uint32_t *) CR_PVDE_BB = (uint32_t)NewState;
000002  6108              STR      r0,[r1,#0x10]
;;;142    }
000004  4770              BX       lr
;;;143    
                          ENDP

000006  0000              DCW      0x0000
                  |L7.8|
                          DCD      0x420e0000

                          AREA ||i.PWR_PVDLevelConfig||, CODE, READONLY, ALIGN=2

                  PWR_PVDLevelConfig PROC
;;;157      */
;;;158    void PWR_PVDLevelConfig(uint32_t PWR_PVDLevel)
000000  4601              MOV      r1,r0
;;;159    {
;;;160      uint32_t tmpreg = 0;
000002  2000              MOVS     r0,#0
;;;161      /* Check the parameters */
;;;162      assert_param(IS_PWR_PVD_LEVEL(PWR_PVDLevel));
;;;163      tmpreg = PWR->CR;
000004  4a03              LDR      r2,|L8.20|
000006  6810              LDR      r0,[r2,#0]
;;;164      /* Clear PLS[7:5] bits */
;;;165      tmpreg &= CR_PLS_MASK;
000008  f02000e0          BIC      r0,r0,#0xe0
;;;166      /* Set PLS[7:5] bits according to PWR_PVDLevel value */
;;;167      tmpreg |= PWR_PVDLevel;
00000c  4308              ORRS     r0,r0,r1
;;;168      /* Store the new value */
;;;169      PWR->CR = tmpreg;
00000e  6010              STR      r0,[r2,#0]
;;;170    }
000010  4770              BX       lr
;;;171    
                          ENDP

000012  0000              DCW      0x0000
                  |L8.20|
                          DCD      0x40007000

                          AREA ||i.PWR_WakeUpPinCmd||, CODE, READONLY, ALIGN=2

                  PWR_WakeUpPinCmd PROC
;;;177      */
;;;178    void PWR_WakeUpPinCmd(FunctionalState NewState)
000000  4901              LDR      r1,|L9.8|
;;;179    {
;;;180      /* Check the parameters */
;;;181      assert_param(IS_FUNCTIONAL_STATE(NewState));
;;;182      *(__IO uint32_t *) CSR_EWUP_BB = (uint32_t)NewState;
000002  6008              STR      r0,[r1,#0]
;;;183    }
000004  4770              BX       lr
;;;184    
                          ENDP

000006  0000              DCW      0x0000
                  |L9.8|
                          DCD      0x420e00a0
